<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        *{
            margin: 0px;padding: 0px;
        }
        .search{
            margin: 30px 10px;
        }
        .search>input{
            outline: none;
            border: none;
            background-color: #f1f1f1;
            width: 80%;
            height: 40px;
            border-radius: 20px;
            padding: 10px;
            box-sizing: border-box;
        }
        .search>span{
            margin-left: 20px;
        }
        .historySearch{
            margin: 10px 10px;
            display: flex;
            justify-content: space-between;
            margin-bottom: 20px;
        }
        .list{
            margin: 10px;
        }
        .list>span{
            display: inline-block;
            background-color: #f1f1f1;
            text-align: center;
            line-height: 40px;
            margin: 10px;
            padding: 0px 10px;
        }
        .searchFind{
            margin: 10px;
        }
        .searchFind>span{
            display: inline-block;
            background-color: #f1f1f1;
            text-align: center;
            line-height: 30px;
            margin: 10px;
            padding: 0px 10px;
        }
    </style>
</head>
<body>
    <div id="app">
        <div class="search">
            <input type="text" placeholder="请输入商品名称" v-model="goods">
            <span @click="addGoods">搜索</span>
        </div>
        <div class="historySearch">
            <h3 class="h3">历史搜索</h3>
            <span class="sp1" @click="deleteGoods">删除</span>
        </div>
        <div class="list">
            <span v-for="(item,index) in goodsArr">{{item}}</span>
        </div>
        <div class="searchFind">
            <h3>搜索发现</h3>
            <span v-for="(item,index) in searchList">{{item}}</span>
        </div>
    </div>
</body>
</html>
<script src="../vue-2.5.21.js"></script>
<script src="./03_search.js"></script>